<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="../../commons/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>分院管理员列表</title>
<link rel="stylesheet" href="<%=request.getContextPath() %>/static/css/pintuer.css">
    <link rel="stylesheet" href="<%=request.getContextPath() %>/static/css/admin.css">
    <script src="<%=request.getContextPath() %>/static/js/jquery.js"></script>
    <script src="<%=request.getContextPath() %>/static/js/pintuer.js"></script>  
    <%-- <script type="text/javascript">
	<%if (session.getAttribute("access")==null){%>
		alert("请登录后访问！");
		parent.location.href='${pageContext.request.contextPath}/login';
	<% }%>
	</script> --%>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head">
  <div style="float: right; margin-right: 20px;">
    <form action="search" method="post">
    	<input name="role_id" type="hidden" value="2" />
		<input type="text" placeholder="请输入搜索关键字" name="userName" class="input" style="width:250px; line-height:15px;display:inline-block;" />
		<button type="submit" class="button border-main icon-search" > 搜索</button>
    </form>
    </div>
    <div style="height: 10px"></div>
  	<strong class="icon-reorder" style="font-size: 17px;"> 分院管理员列表</strong>
  	<div style="clear: both"></div>
  </div>
  <table class="table table-hover text-center">
    <tr>
      <th width="10%">用户ID</th>
      <th>管理员姓名</th>  
      <th>管理员性别</th>  
      <th>联系方式</th>  
      <th width="250">操作</th>
    </tr>
   
   <c:forEach items="${hospitalAdminList }" var="list">
	   <tr>
	      <td>${list.id }</td>      
	      <td>${list.userName }</td>
	      <td>${list.sex }</td>
	      <td>${list.tele }</td>
	      <td>
	        <div class="button-group">
	          <a type="button" class="button border-main" href="edit?id=${list.id }&userName=${list.userName }&tele=${list.tele }"><span class="icon-edit"></span>修改</a>
	          <a class="button border-red" href="javascript:void(0)" onclick="return del(${list.id })"><span class="icon-trash-o"></span> 删除</a>
	        </div>
	      </td>
	    </tr> 
   </c:forEach>
   
   
    <!-- <tr>
      <td>1</td>      
      <td>张三</td>  
      <td>2017-02-13</td>      
      <td>
      <div class="button-group">
      <a type="button" class="button border-main" onclick="window.parent.frames.add()"><span class="icon-edit"></span>修改</a>
       <a class="button border-red" href="javascript:void(0)" onclick="return del(17)"><span class="icon-trash-o"></span> 删除</a>
      </div>
      </td>
    </tr>  -->
    
    
  </table>
</div>
<script>
function del(id){
	if(confirm("您确定要删除吗?")){
		location = "${pageContext.request.contextPath}/user/hospitalAdmin/delete?id="+id;
	}
}
</script>

</body>
</html>